<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>NATS C Client with JetStream and Streaming support: microClient</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with JetStream and Streaming support
   &#160;<span id="projectnumber">3.10.0-beta</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__micro_client_functions.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">microClient<div class="ingroups"><a class="el" href="group__micro_group.html">- Microservices</a> &raquo; <a class="el" href="group__micro_functions.html">Functions</a></div></div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga191be60c4f9bb88f83f73b5ce4e5e0bd" id="r_ga191be60c4f9bb88f83f73b5ce4e5e0bd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_client_functions.html#ga191be60c4f9bb88f83f73b5ce4e5e0bd">micro_NewClient</a> (<a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> **new_client, <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__micro_types.html#ga550430b08d2e071e3901c6d720f4a039">microClientConfig</a> *cfg)</td></tr>
<tr class="memdesc:ga191be60c4f9bb88f83f73b5ce4e5e0bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new microservice client.  <br /></td></tr>
<tr class="separator:ga191be60c4f9bb88f83f73b5ce4e5e0bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62a528edb67328bd7c478b6338656e1a" id="r_ga62a528edb67328bd7c478b6338656e1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_client_functions.html#ga62a528edb67328bd7c478b6338656e1a">microClient_Destroy</a> (<a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> *client)</td></tr>
<tr class="memdesc:ga62a528edb67328bd7c478b6338656e1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a microservice client.  <br /></td></tr>
<tr class="separator:ga62a528edb67328bd7c478b6338656e1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3be6a03f5846ac1bb06f091bea36a99" id="r_gac3be6a03f5846ac1bb06f091bea36a99"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__micro_client_functions.html#gac3be6a03f5846ac1bb06f091bea36a99">microClient_DoRequest</a> (<a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **reply, <a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> *client, const char *subject, const char *data, int data_len)</td></tr>
<tr class="memdesc:gac3be6a03f5846ac1bb06f091bea36a99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a request to a microservice and receives the response.  <br /></td></tr>
<tr class="separator:gac3be6a03f5846ac1bb06f091bea36a99"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga191be60c4f9bb88f83f73b5ce4e5e0bd" name="ga191be60c4f9bb88f83f73b5ce4e5e0bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga191be60c4f9bb88f83f73b5ce4e5e0bd">&#9670;&#160;</a></span>micro_NewClient()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> * micro_NewClient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> **&#160;</td>
          <td class="paramname"><em>new_client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__micro_types.html#ga550430b08d2e071e3901c6d720f4a039">microClientConfig</a> *&#160;</td>
          <td class="paramname"><em>cfg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">new_client</td><td>received the pointer to the new client. </td></tr>
    <tr><td class="paramname">nc</td><td>a NATS connection. </td></tr>
    <tr><td class="paramname">cfg</td><td>for future use, use NULL for now.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7" title="the Microservice error object.">microError</a> if an error occurred. </dd></dl>

</div>
</div>
<a id="ga62a528edb67328bd7c478b6338656e1a" name="ga62a528edb67328bd7c478b6338656e1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62a528edb67328bd7c478b6338656e1a">&#9670;&#160;</a></span>microClient_Destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void microClient_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> *&#160;</td>
          <td class="paramname"><em>client</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>the client to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac3be6a03f5846ac1bb06f091bea36a99" name="gac3be6a03f5846ac1bb06f091bea36a99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3be6a03f5846ac1bb06f091bea36a99">&#9670;&#160;</a></span>microClient_DoRequest()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7">microError</a> * microClient_DoRequest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gadcab54026c4ed78f344ce03ce31bb61a">natsMsg</a> **&#160;</td>
          <td class="paramname"><em>reply</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__micro_types.html#ga22c8eebaa1ca15ba0834b89cc1081130">microClient</a> *&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>subject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reply</td><td>receives the pointer to the response NATS message. <code>reply</code> must be freed with <a class="el" href="group__msg_group.html#ga9e9590018284939f43f60964283f33ae" title="Destroys the message object.">natsMsg_Destroy</a>. </td></tr>
    <tr><td class="paramname">client</td><td>the client to use. </td></tr>
    <tr><td class="paramname">subject</td><td>the subject to send the request on. </td></tr>
    <tr><td class="paramname">data</td><td>the request data. </td></tr>
    <tr><td class="paramname">data_len</td><td>the request data length.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="group__micro_types.html#ga41ae4121cf2f8e326369bbc2e44e20d7" title="the Microservice error object.">microError</a> if an error occurred. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
